<div class="left_list">
   <!-- <div class="head_navleft"><img src="/image/icon_dt.jpg">关于我们</div>-->
    <ul class="nav_left" id="left_menu">

    </ul>
</div>
<dl class="lxwm">
    <dt><img src="/image/icon_dt.jpg">联系我们</dt>
    <dd>地址：中国 西安经济技术开发区泾渭工业园西金路15号 <br>
        电话：029-86968415 <br>
        传真：029-86968416<br>
        E-MAIL:bgs@c-wmm.com </dd>
</dl>

<script>

    $(function(){


        $.ajax({
            url:'/articlec/jsonall',
            async:false,
            dataType:'json',
            success:function(datas){
                //log(datas);
                for(var i in datas){
                    var result = false;
                    var linkvalid = datas[i]['linkvalid'];
                    if(!linkvalid){
                        result = true;
                    }else{
                        result = linkvalid=='true'?true:false;
                    }

                    menuItems[datas[i]["_id"]]=result;
                }
            }

        });


        var mid = '#<%=menu.id%>';
        $.get('/mainmenu/onlyone',function(menus){


            var rootmenu = $(menus.content);

            var curNode=  rootmenu.find(mid);

            var parent =  curNode.parentsUntil("ul#root_parent");


            var realMenus = parent;

            if(parent[0]) {



                realMenus = parent[parent.length-1];


            }
            else{


                realMenus = curNode;

            }

            $(mid,realMenus).find('a:first').css('color','yellow');

            $("#left_menu").append(realMenus);


            $(document.body).off('click',"#left_menu li a");
            $(document.body).on('click',"#left_menu li a",function(event){
                var key = $(event.target).parent('li').attr('id');
                var opened = menuItems[key];
                if(opened){
                    window.open($(event.target).attr('href'),'_self');
                }
                return false;
            });



        });




    });

</script>